<admintpl file="header" />
<style>
.well{font-size:12px;}
select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input{
padding:0px;
}
.table>thead>tr>th{border-bottom:none;}
.table>thead>tr>th.tableHeadertrdth1 {border-left: 1px solid #ddd;}
.pagination a{
  color:#40b091;
}
</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<form class="well form-search" method="post" action="admin.php?g=Admin&m=Homesys&a=index">
                <input type="text" id="search_name" name="name" style="width:180px;" value="{$postData['name']}" placeholder="请输入用户ID/手机号/昵称"> 
				&nbsp;&nbsp;
				<!-- 
				<select name="newold" id="newold" style="width:90px;">
				    <option value=""></option>
				    <option value="新客" <if condition="'新客' == $postData['newold']">selected="selected"</if> >新客</option>
				    <option value="老客" <if condition="'老客' == $postData['newold']">selected="selected"</if>>老客</option>
				 </select> &nbsp;&nbsp;
				 -->
			
			<!-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;您查看的是： -->
			<select name="game" id="game" style="width:260px;">
			    <foreach name="gameInfo" item="game">
			       <option value="{$game.id}" <if condition="$gameId == $game['id']">selected="selected"</if> >{$game.name}</option>
			    </foreach>
			 
			 </select>
			<script type="text/javascript">
			        
			        $(function() {
			        	/**
			        	$("#newold").change(function(){
			        		var _qu=$("#qu").val();
			        		var _nj=$(this).val();
			        		//window.location.href="admin.php?g=Admin&m=Studentsys&a=index&qu="+_qu+'&nj='+_nj;
			        	});
			        	*/
			        	$("#goExp").click(function(){
			        		var _name=$("#search_name").val();
			        		var _newold='';
			        		window.location.href="http://climb-game.51wom.com/chuang/?c=ex-user&gid={$gameId}&name="+_name+"&newold="+_newold;
				        });
			        });
			</script>&nbsp;&nbsp;
			<input type="submit" class="btn btn-primary" value="搜索" /> &nbsp;&nbsp;
			<a href="javascript:;" id="goExp" class="btn btn-primary"> 导出 </a>
			
	             <!-- 数据 -->
			     <script type="text/javascript">
		            $(function() {
		            	$("#game").change(function(){
		            		var _gid=$("#game").val();
		            		window.location.href="admin.php?g=Admin&m=Homesys&a=index&gid="+_gid;
		            	});
		            });
	            </script>
		</form>
		
		<form class="js-ajax-form" action="" method="post">
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
						<th width="30" class="tableHeadertrdth1">用户ID</th>
						<th width="90">用户信息</th>
						<th width="60">手机号</th>
						<th width="60">备注</th>
						<th width="90">注册时间</th>
						<th width="60">操作</th>
					</tr>
				</thead>
				<foreach name="thedata" item="data">
					<tr>
						<td><b>{$data['id']}</b></td>
						<td><b><if condition="!empty($data['headimg'])"><img width="80" style="border-radius:50%;" src="{$data['headimg']}" />&nbsp;&nbsp;</if></b><b>{$data['nickname']}</b></td>
						<td><b>{$data['phone']}</b></td>
						<td><b>{$data['beizhu']}</b></td>
						<td><b>{$data['createtime']}</b></td>
						<td>
							<a style="font-weight:600;" href="admin.php?g=Admin&m=homesys&a=edit&id={$data['id']}&p={$postData['p']}">编辑</a>
						</td>
					</tr>	
				</foreach>			
			</table>
			<div class="paginationoutbox">
				<div class="pagination">{$page}</div>
			</div>
		</form>
	</div>
	<script src="public/js/common.js"></script>
	<script>
		$(function() {
			setCookie("refersh_time", 0);
			Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
				//批量复制
				$('.js-articles-copy').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/index.php?g=portal&m=AdminPost&a=copy&ids="+ ids, {
						title : "批量复制",
						width : "300px"
					});
				});
				//批量移动
				$('.js-articles-move').click(function(e) {
					var ids=[];
					$("input[name='ids[]']").each(function() {
						if ($(this).is(':checked')) {
							ids.push($(this).val());
						}
					});
					
					if (ids.length == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					
					ids= ids.join(',');
					art.dialog.open("/admin.php?g=portal&m=AdminPost&a=move&old_term_id=0&ids="+ ids, {
						title : "批量移动",
						width : "300px"
					});
				});
			});
		});
	</script>
</body>
</html>